package com.doraro.platform.module.device.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.doraro.platform.module.device.model.entity.RepairOrder;
import com.doraro.platform.module.device.model.param.RepairDeviceParam;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author doraro
 * @since 2019-04-21
 */
public interface IRepairOrderService extends IService<RepairOrder> {


    RepairOrder getUnresolvedOrder(String orderId, String userId);


    boolean setOrderMaintain(String orderId, String engineerId, String managerId);

    String createOrder(RepairDeviceParam param, String userId);

    boolean updateByOrderId(String orderId, RepairDeviceParam param, String userId);


    RepairOrder completeOrder(String orderId, String engineerId);

    RepairOrder confirmCompleteOrder(String orderId);


    boolean rejectOrder(String userId, String orderId);


    Integer getCycleTime(String deviceId);

    IPage<RepairOrder> getUnresolvedOrderByPage(Page<RepairOrder> param, RepairOrder searchParam);
}
